package com.linwen.javase.desgin_pattern.structure.flyweight;

/**
 * @ClassName FlyWeightTest
 * @Description
 * @Author lin
 * @Date 2022/6/22 上午1:31
 * @Version V1.0
 */
public class FlyWeightTest {
    public static void main(String[] args) {
        FlyWeightFactory flyWeightFactory = new FlyWeightFactory();
        FlyWeight a = flyWeightFactory.getFlyWeight("a");
        a.operation();
        FlyWeight a1 = flyWeightFactory.getFlyWeight("a");
        a1.operation();
        FlyWeight b = flyWeightFactory.getFlyWeight("b");
        b.operation();
    }
}
